import React from "react";
import ReactEcharts from 'echarts-for-react';

class EcChartExp extends React.Component {
    constructor(props) {
        super(props)
        this.state = {
            data1: ['一月', '二月', '三月', '四月', '五月', '六月'],
            data2: [15, 5, 36, 10, 10, 21]
        }
    }
    render() {
        return (
            <ReactEcharts
                option={
                    {
                        title: {
                            text: '销量统计'
                        },
                        tooltip: {},
                        xAxis: {
                            data: this.state.data1
                        },
                        yAxis: {},
                        series: [{
                            name: '销量',
                            type: 'bar',
                            data: this.state.data2
                        }]
                    }
                }
                notMerge={true}
                lazyUpdate={true} />
        )
    }
}
export default EcChartExp;